import java.util.ArrayList;
import java.util.List;


public class Main {
	public static void main(String[] args) {
/*		 User u1 = new User("zhangsan","222","男",12);  
	        User u2 = new User("lisi","333","男",15);          
	        User u3 = new User("wangwu","555","女",13);  
	        User u4 = new User("zhangsan","444","女",14);  
	          
	        List<User> users = new ArrayList();  
	        users.add(u1);  
	        users.add(u2);  
	        users.add(u3);  
	          
	        boolean isEqual = users.contains(u4);  
	        System.out.println("u1与u4的比较结果是："+isEqual);*/ 
	        
			 UserString u1s = new UserString("zhangsan","222","男",12);  
			 UserString u2s = new UserString("lisi","333","男",15);          
			 UserString u3s = new UserString("wangwu","555","女",13);  
			 UserString u4s = new UserString("zhangsan","444","女",14);  
		          
		        List<UserString> userss = new ArrayList<UserString>();  
		        userss.add(u1s);  
		        userss.add(u2s);  
		        userss.add(u3s);  
		
		          
		        boolean iscontain = userss.contains("zhangsan");  
		        System.out.println("userss是否包含 zhangsan："+iscontain); 
		        
		        System.out.println("userss是否包含 u1s："+userss.indexOf("zhangsan")); 
		        System.out.println("u1s是否等于 zhangsan："+u1s.equals("zhangsan")); 
		        
/*		        List<String> strlist = new ArrayList<String>(); 
		        strlist.add("zhangsan");
		        strlist.add("lisi");
		        strlist.add("wangwu");
		        boolean isstrcontain = strlist.contains("zhangsan");  
		        System.out.println("strlist是否包含 zhangsan："+isstrcontain+", "+
		        		strlist.indexOf("lisi")); */
		        
		        
	}
}
